<include file="Admin/Tpl/Public/admin_nav.html"/>
<div id="main-content">
	<div class="clear"></div>
    <div class="content-box">
        <div class="content-box-header">
            <ul class="content-box-tabs">
                <li><a href="#tab1" class="default-tab">列 表</a></li>
                <li><a href="#tab2">添 加</a></li>
            </ul>
        	<div class="clear"></div>
        </div>
		<div class="content-box-content">
			<div class="tab-content default-tab" id="tab1">
            <div style="margin:0px 0 10px 0; float:left">
                <form action="__URL__/index" method="get">
                    <input type="text" name="seach" class="text-input" style="color:#CCCCCC; width:220px" id="seach" />
                    <input type="submit" class="button" value="搜索" />
                    <input type="button" onclick="javascript:window.location='__URL__'" class="button" value="重置" />
                </form>
            </div>
            <table>
                <thead>
                    <tr style="text-align:center">
                        <td style="text-align:center;width:60px">编号</td>
                        <td style="text-align:center;">公司名称</td>
                        <td style="text-align:center;width:100px">联系人</td>
                        <td style="text-align:center;width:120px">公司电话</td>
                        <td style="text-align:center;width:100px">开启状态</td>
                        <td style="text-align:center;width:160px">添加时间</td>
                        <td style="text-align:center;width:240px">操作</td>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <td colspan="9">
                        <div class="bulk-actions align-left"> </div>
                        <div class="pagination">{$rs.show}</div>
                        <div class="clear"></div>
                        </td>
                    </tr>
                </tfoot>
                <tbody>
                    <volist name="rs.data" id="val"> 
                        <tr>                    
                            <td style='text-align:center;vertical-align:middle; line-height:25px'>{$val.company_id}</td>
                            <td style='text-align:center;vertical-align:middle'>{$val.company_name}</td>
                            <td style='text-align:center;vertical-align:middle'>{$val.company_contactPerson}</td>
                            <td style='text-align:center;vertical-align:middle'>{$val.company_contactTel}</td>
                            <td style='text-align:center;vertical-align:middle'>{$val.company_disabled}</td>
                            <td style='text-align:center;vertical-align:middle'>{$val.time_insert}</td>
                            <td style='text-align:center;vertical-align:middle''>
                            	<a href='javascript:void(0)' onclick="choose_company_app({$val.company_id})" title='add'>功能分配</a>
                                &nbsp;|&nbsp;
                                <a href='javascript:void(0)' onclick="open_company_admin({$val.company_id})" title='add'>管理员管理</a>
                                &nbsp;|&nbsp;
                                <a href='javascript:void(0)' onclick="upt_company({$val.company_id})" title='Edit'>修改</a>
                                &nbsp;|&nbsp;
                                <a href='javascript:void(0)' onclick='del_company({$val.company_id})' title='Delete'>删除</a>
                            </td>
                        </tr>
                    </volist>
                </tbody>
            </table>
            </div>
            <!-- end tab1-->
            <div class="tab-content" id="tab2">
                <form method="post" enctype="multipart/form-data" action="__URL__/addAct">
                <fieldset>
                <table>
                	<tr>
                        <td width="20%">公司名称<span style="color:red"> * </span></td>
                        <td width="80%"><input class="text-input small-input" type="text" name="company_name"/></td>
                    </tr>
                    <tr>
                        <td width="20%">超级管理员账号<span style="color:red"> * </span></td>
                        <td width="80%"><input class="text-input small-input" type="text" name="company_admin"/></td>
                    </tr>
                    <tr>
                        <td width="20%">超级管理员密码<span style="color:red"> * </span></td>
                        <td width="80%"><input class="text-input small-input" type="text" name="company_pwd"/></td>
                    </tr>
                	<tr>
                        <td width="20%">联系人<span style="color:red"> * </span></td>
                        <td width="80%"><input class="text-input small-input" type="text" name="company_contactPerson"/></td>
                    </tr>
                	<tr>
                        <td width="20%">联系人电话<span style="color:red"> * </span></td>
                        <td width="80%"><input class="text-input small-input" type="text" name="company_contactTel"/></td>
                    </tr>
                	<tr>
                        <td width="20%">联系人邮箱<span style="color:red"> * </span></td>
                        <td width="80%"><input class="text-input small-input" type="text" name="company_contactEmail"/></td>
                    </tr>
                </table>
                <p>
                <input class="button" type="submit" value="Submit" />
                <input type="reset" id="reset_form" style="display:none" /> 
                </p>
                </fieldset>
                <div class="clear"></div>
                </form>
            </div>
		</div>
	</div>
</div>
</div>
<script type="text/javascript">
function choose_company_app($company_id)
{
	var iWidth=320; //窗口宽度
	var iHeight=480;//窗口高度
	var iTop=(window.screen.height-iHeight)/2;
	var iLeft=(window.screen.width-iWidth)/2;
	window.open("__URL__/choose_app?cid="+$company_id,"app","Toolbar=no,Location=no,Direction=no,Width="+iWidth+" ,Height="+iHeight+",top="+iTop+",left="+iLeft);
}
</script>